# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=py3-looseversion
pkgver=1.3.0
pkgrel=3
pkgdesc="Version numbering for anarchists and software realists"
url='https://github.com/effigies/looseversion'
license="PSF-2.0"
arch="noarch"
makedepends="
	py3-gpep517
	py3-hatchling
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/effigies/looseversion/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/looseversion-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 tests.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
88d20bee8addf6e9481e7b93c18dd2ebe7efb19f5ba0e0fce738d025c15dc74fb686034164d63085c7ef73a9ea56b5021d6fac9f2807f48b40e7fd7a4bdd5d45  py3-looseversion-1.3.0.tar.gz
"
